package com.gidgabs.modules.entity;

import com.gidgabs.dto.TbAddressDto;

import java.io.Serializable;



/**
 * 收货地址表
 * 
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-07-02 10:07:40
 */

public class TbAddressEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//
	private Integer id;
	//收货地址编码
	private String thingCode;
	//收货人姓名
	private String name;
	//收货人电话号码
	private String tel;
	//省id
	private Integer provinceid;
	//市id
	private Integer cityid;
	//区id
	private Integer districtid;
	//省名称
	private String provinceName;
	//市名称
	private String cityName;
	//区名称
	private String districtName;
	//详细地址
	private String detailed;
	//0:代表默认，1:代表非默认
	private Integer isDefault;
	//用户编码
	private Integer userId;

	/**
	 * 设置：
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * 设置：收货地址编码
	 */
	public void setThingCode(String thingCode) {
		this.thingCode = thingCode;
	}
	/**
	 * 获取：收货地址编码
	 */
	public String getThingCode() {
		return thingCode;
	}
	/**
	 * 设置：收货人姓名
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * 获取：收货人姓名
	 */
	public String getName() {
		return name;
	}
	/**
	 * 设置：收货人电话号码
	 */
	public void setTel(String tel) {
		this.tel = tel;
	}
	/**
	 * 获取：收货人电话号码
	 */
	public String getTel() {
		return tel;
	}
	/**
	 * 设置：省id
	 */
	public void setProvinceid(Integer provinceid) {
		this.provinceid = provinceid;
	}
	/**
	 * 获取：省id
	 */
	public Integer getProvinceid() {
		return provinceid;
	}
	/**
	 * 设置：市id
	 */
	public void setCityid(Integer cityid) {
		this.cityid = cityid;
	}
	/**
	 * 获取：市id
	 */
	public Integer getCityid() {
		return cityid;
	}
	/**
	 * 设置：区id
	 */
	public void setDistrictid(Integer districtid) {
		this.districtid = districtid;
	}
	/**
	 * 获取：区id
	 */
	public Integer getDistrictid() {
		return districtid;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	/**
	 * 设置：详细地址
	 */
	public void setDetailed(String detailed) {
		this.detailed = detailed;
	}
	/**
	 * 获取：详细地址
	 */
	public String getDetailed() {
		return detailed;
	}

	public String getProvinceName() {
		return provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	public String getDistrictName() {
		return districtName;
	}

	public void setDistrictName(String districtName) {
		this.districtName = districtName;
	}

	public Integer getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(Integer isDefault) {
		this.isDefault = isDefault;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public TbAddressDto toDto(){
		TbAddressDto tbAddressDto = new TbAddressDto();
		tbAddressDto.setName(this.getName());
		tbAddressDto.setId(this.getId());
		tbAddressDto.setThingCode(this.getThingCode());
		tbAddressDto.setTel(this.getTel());
		tbAddressDto.setProvinceid(this.getProvinceid());
		tbAddressDto.setCityid(this.getCityid());
		tbAddressDto.setDistrictid(this.getDistrictid());
		tbAddressDto.setProvinceName(this.getProvinceName());
		tbAddressDto.setCityName(this.getCityName());
		tbAddressDto.setDistrictName(this.getDistrictName());
		tbAddressDto.setDetailed(this.getDetailed());
		tbAddressDto.setIsDefault(this.getIsDefault());
		tbAddressDto.setUserId(this.getUserId());
		return tbAddressDto;
	}
}
